<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><fmt:message key="checkout.checkoutFlow" /> | <fmt:message key="checkout.congratulationsAnonymous" /></title>
	<meta http-equiv="Pragma" content="no-cache" />
</head>

<body>

		<div class="shopping_step">
			<ul>
				<li class="s1"><span><a href="javascript:void(0)">1.<fmt:message key="checkout.process.step1" /></a></span></li>
				<li class="s2"><span>2.<fmt:message key="checkout.process.step2" /></span></li>
				<li class="s3"><span class="curr">3.<fmt:message key="checkout.process.step3" /></span></li>
			</ul>
		</div>
		<div class="checkout">
			<div class="top"></div>
			<div class="prompt_info">
				<c:choose>
					<c:when test="${salesOrder.paymentMethodId == 5}">
						<h3>
							<span>
								<fmt:message key="checkout.overview.placeOrderSucc3">
									<fmt:param>
										<font color="orange"><fmt:message key="salesOrder.status.ready4SelfCollection"/></font>
									</fmt:param>
								</fmt:message>
							</span>
						</h3>
					</c:when>
					<c:when test="${salesOrder.isCod == 1}">
						<h3><span><fmt:message key="checkout.overview.placeOrderSucc1" /></span></h3>
					</c:when>
					<c:when test="${salesOrder.isCod != 1 && salesOrder.unPaidAmount > 0}">
						<h3><span><fmt:message key="checkout.overview.placeOrderSucc2" /></span></h3>
					</c:when>
					<c:otherwise>
						<h3><span><fmt:message key="checkout.overview.placeOrderSucc1" /></span></h3>
					</c:otherwise>
				</c:choose>

				<p>
					<fmt:message key="checkout.overview.orderNo"/>：<span>${salesOrder.orderNo}</span>&nbsp;&nbsp;&nbsp;&nbsp;
					<fmt:message key="checkout.overview.total"/>：<b><common:currencyFormat value="${salesOrder.unPaidAmount}"/></b>&nbsp;&nbsp;&nbsp;&nbsp;
					<fmt:message key="checkout.overview.paymentType"/>：<span>${salesOrder.paymentTypeDesc}</span>
					<c:if test="${not empty salesOrder.exceptedSelfCollectDate}">
						&nbsp;&nbsp;&nbsp;&nbsp;
						<fmt:message key="salesOrder.exceptedSelfCollectDate"/>：<span><fmt:formatDate value="${salesOrder.exceptedSelfCollectDate}" pattern="yyyy-MM-dd"/></span>
					</c:if>
				</p>
			</div>
			<!-- 货到付款 -->
			<c:if test="${salesOrder.paymentMethodId == 1}">
			<div class="content">
				<div class="order_info">
					<div class="pay">
						<div class="hd clearfix">
							<div class="do">
								<c:if test="${not empty salesOrder.customer}">
									<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
								</c:if>
							</div>
						</div>
					</div>
				</div>
			</div>
			</c:if>
			<!-- 货到付款end -->
			<!-- 在线支付 -->
			<c:if test="${salesOrder.unPaidAmount > 0 && salesOrder.paymentMethodId != 1 && salesOrder.paymentMethodId != 3 && salesOrder.paymentMethodId != 4 && salesOrder.paymentMethodId != 5}">
				<div class="content">
					<div class="order_info">
						<div class="pay">
							<div class="hd clearfix">
								<h4>
									<fmt:message key="checkout.overview.nextStepLimit">
										<fmt:param>${appConfig.orderCancelDay}</fmt:param>
									</fmt:message>
								</h4>
								<div class="do">
									<c:if test="${(not empty salesOrder.customer) and (salesOrder.customer.anonymousUser == false)}">
										<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
									</c:if>
								</div>
							</div>
							<c:set var="orderNo" value="${salesOrder.orderNo}" />
							<%@ include file="./include/onlinePaymentMethod.jspf"%>
						</div>
					</div>
				</div>
			</c:if>
			<!-- 在线支付end -->
			<!-- 银行卡转帐 -->
			<c:if test="${salesOrder.unPaidAmount > 0 && salesOrder.paymentMethodId == 3}">
			<div class="content">
				<div class="order_info">
					<div class="pay">
						<div class="hd clearfix">
							<h4><fmt:message key="checkout.overview.nextStep"/></h4>
							<div class="do">
								<c:if test="${(not empty salesOrder.customer) and (salesOrder.customer.anonymousUser == false)}">
									<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
								</c:if>
							</div>
						</div>
						<div>
							<p class="title"><fmt:message key="checkout.overvie.bankTransfer"/>：</p>
							<c:set var="accountNames" value="${fn:split(appConfig.bankAccountName, ',')}"/>
							<c:set var="accountAddresss" value="${fn:split(appConfig.bankAccountAddress, ',')}"/>
							<c:set var="accountNos" value="${fn:split(appConfig.bankAccountNo, ',')}"/>
							<c:forEach var="accountName" items="${accountNames}" varStatus="status">
							<div class="open_block">
								<table border="0" cellspacing="0" cellpadding="0" class="t2">
									<tr>
										<th><fmt:message key="checkout.paymentMethod.bankTransfer.accountName"/>：</th>
										<td>${accountNames[status.index]}</td>
									</tr>
									<tr>
										<th><fmt:message key="checkout.paymentMethod.bankTransfer.address"/>：</th>
										<td>${accountAddresss[status.index]}</td>
									</tr>
									<tr>
										<th><fmt:message key="checkout.paymentMethod.bankTransfer.accountNo"/>：</th>
										<td>${accountNos[status.index]}</td>
									</tr>
								</table>
							</div>
							<br/>
							</c:forEach>
						</div>
					</div>
				</div>
			</div>
			</c:if>
			<!-- 银行卡转帐end -->
			<!-- 邮局汇款说明 -->
			<c:if test="${salesOrder.unPaidAmount > 0 && salesOrder.paymentMethodId == 4}">
			<div class="content">
				<div class="order_info">
					<div class="pay">
						<div class="hd clearfix">
							<h4><fmt:message key="checkout.overview.nextStep"/></h4>
							<div class="do">
								<c:if test="${(not empty salesOrder.customer) and (salesOrder.customer.anonymousUser == false)}">
									<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
								</c:if>
							</div>
						</div>
						<div>
							<p class="title"><fmt:message key="checkout.overvie.postoffice"/>：</p>
							<div class="open_block">
								<table border="0" cellspacing="0" cellpadding="0" class="t2">
									<tr>
										<th><fmt:message key="checkout.paymentMethod.postoffice.account"/>：</th>
										<td>${appConfig.postofficeAccountNo}</td>
									</tr>
									<tr>
										<th><fmt:message key="checkout.paymentMethod.postoffice.receiver"/>：</th>
										<td>${appConfig.postofficePayee}</td>
									</tr>
								</table>
							</div>
						</div>
						<div class="info">
							<dl>
								<dt><fmt:message key="checkout.howToPay.postoffice.tips" />：</dt>
								<dd><fmt:message key="checkout.howToPay.postoffice.tips1" /></dd>
								<dd><fmt:message key="checkout.howToPay.postoffice.tips2" /></dd>
								<dd><fmt:message key="checkout.howToPay.postoffice.tips3" /></dd>
							</dl>
						</div>
					</div>
				</div>
			</div>
			</c:if>
			<!-- 邮局汇款说明end -->
			<!-- 上门自提说明 -->
			<c:if test="${salesOrder.paymentMethodId == 5}">
			<div class="content">
				<div class="order_info">
					<div class="pay">
						<div class="hd clearfix">
							<h4><fmt:message key="checkout.tip"/></h4>
							<div class="do">
								<c:if test="${(not empty salesOrder.customer) and (salesOrder.customer.anonymousUser == false)}">
									<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
								</c:if>
							</div>
						</div>
						<div class="open_block">
							<dl>
								<dd><fmt:message key="checkout.overview.selfCollect.tip1"/></dd>
								<dd>
									<fmt:message key="checkout.overview.selfCollect.tip2">
										<fmt:param><font color="orange"><fmt:message key="salesOrder.status.ready4SelfCollection"/></font></fmt:param>
									</fmt:message>
								</dd>
							</dl>
						</div>
						<div class="info">
							<dl>
								<dt><fmt:message key="checkout.overview.selfCollect" />：</dt>
								<dd>&nbsp;&nbsp;&nbsp;&nbsp;<b>${salesOrder.selfCollectionCentre.selfCollectionCentreName}</b></dd>
								<dd>&nbsp;&nbsp;&nbsp;&nbsp;<fmt:message key="salesOrder.selfCollectionCentreAddress"/>：${salesOrder.selfCollectionCentre.regionFullName},${salesOrder.selfCollectionCentre.address}</dd>
								<dd>&nbsp;</dd>
								<dd>&nbsp;&nbsp;&nbsp;&nbsp;<fmt:message key="checkout.overview.selfCollect.howto.tip1" /></dd>
								<dd>&nbsp;&nbsp;&nbsp;&nbsp;<fmt:message key="checkout.overview.selfCollect.howto.tip2"><fmt:param><fmt:message key="salesOrder.status.ready4SelfCollection"/></fmt:param></fmt:message></dd>
							</dl>
						</div>
						<div class="pay_go">
							<fmt:message key="checkout.overview.whatYouCanDo" />：
							<c:if test="${(not empty salesOrder.customer) and (salesOrder.customer.anonymousUser == false)}">
								<a href="${ctxPath}/customer/csOrders.html?doAction=viewOrder&orderNo=${salesOrder.orderNo}" class="btn_01"><span><fmt:message key="checkout.overview.viewOrder"/></span></a>
							</c:if>
							<a href="${ctxPath}/index.html" class="btn_01"><span><fmt:message key="shoppingcart.continue" /></span></a> 
							<a href="${ctxPath}/feedback.html" class="btn_01"><span><fmt:message key="csFeedback.title" /></span></a>
						</div>
					</div>
				</div>
			</div>
			</c:if>
			<!-- 上门自提说明end -->
		</div>
</body>
</html>